import axios from "@/axios";

export default {
  //获取验证码，注意返回二进制流，这里需要处理响应为blob
  getCaptcha:function(data){
    return axios.get('/business/admin/kaptcha/image-code/'+data,{
      responseType: 'blob'
    })
  },
  //登录
  login:function(data){
    return axios.post('/business/admin/employee/login',data,{
      headers:{
        'Content-Type':'application/json'
      }
    })
  },
  //获取用户信息(TODO)
  getUser:function(){
    return axios.get('/business/admin/employee/info')
  },
  //修改密码
  resetPWD:function(data){
    return axios.post('/business/admin/employee/resetPWD',data,{
      headers:{
        'Content-Type':'application/json'
      }
    })
  },
  //退出登录
  logout:function(data){
    return axios.get('/business/admin/employee/loginOut/'+data)
  },

  //获取菜单列表（TODO）
  getMenuList:function(data){
    return axios.get('/business/admin/menu/list')
  },

  //获取接口列表（TODO）
  getInterfaceList:function(data){
    return axios.get('/business/admin/role/list')
  },

  //TODO注册


}


